package com.ccz.demo.design.proxy.demo2;

/**
 * @ClassName Shop
 * @Author caihaoyun
 * @Date 2020/5/29
 * @Version V1.0
 **/
public class Shop implements Factory {

    private Factory factory;

    public Shop(Factory factory) {
        this.factory = factory;
    }

    @Override
    public void sell() {
        System.out.println("商店代理销售");
        factory.sell();
    }

    @Override
    public void ad() {
        System.out.println("商店代理广告");
        factory.ad();
    }
}
